#!/usr/bin/python3
# -*- coding: utf8 -*-
# Date   : 2021/02/12
# Author : Kwan
# Email  : allenxian@live.com
# Blog   : https://my.oschina.net/u/4173440

from flask import Blueprint, render_template, redirect, url_for
from flask_login import login_required
from flasky.common import manager_required


# 月租管理
monthly = Blueprint(name='monthly', import_name='flasky', url_prefix='/monthly', template_folder='views/templates')


@monthly.route('/')
@login_required
@manager_required
def default():
    """
    月租管理
    """
    return redirect(url_for('monthly.manage'))


@monthly.route('/manage')
@login_required
@manager_required
def manage():
    """
    月租用户管理
    """
    return render_template('monthly/default.html')